package org.liaohailong.victorlibrary.base

import android.annotation.SuppressLint
import android.os.Bundle
import android.view.WindowManager
import androidx.fragment.app.FragmentActivity
import org.liaohailong.library.log.Logcat

/**
 * Author: liaohailong
 * Date: 2019/3/11
 * Time: 9:46 PM
 * Description:
 **/
abstract class BaseActivity : FragmentActivity() {
    protected val logcat = Logcat.obtain(this)

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        logcat.i("onCreate")
        //屏幕常亮
        window.addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON)
    }

    override fun onStart() {
        super.onStart()
        logcat.i("onStart")
    }

    override fun onResume() {
        super.onResume()
        logcat.i("onResume")
    }

    override fun onPause() {
        super.onPause()
        logcat.i("onPause")
    }

    override fun onStop() {
        super.onStop()
        logcat.i("onStop")
    }

    override fun onDestroy() {
        super.onDestroy()
        logcat.i("onDestroy")
    }
}